package com.frcdi.qms.equipment.service.impl;

import com.frcdi.qms.equipment.domain.EquipmentRange;
import com.frcdi.qms.equipment.mapper.EquipmentRangeMapper;
import com.frcdi.qms.equipment.service.IEquipmentRangeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 设备有效量程Service业务层处理
 *
 * @author cell
 * @date 2023-10-10
 */
@Service
public class EquipmentRangeServiceImpl implements IEquipmentRangeService
{
    @Autowired
    private EquipmentRangeMapper equipmentRangeMapper;

    /**
     * 查询设备有效量程
     *
     * @param rangeId 设备有效量程主键
     * @return 设备有效量程
     */
    @Override
    public EquipmentRange selectEquipmentRangeByRangeId(Long rangeId)
    {
        return equipmentRangeMapper.selectEquipmentRangeByRangeId(rangeId);
    }

    /**
     * 查询设备有效量程列表
     *
     * @param equipmentRange 设备有效量程
     * @return 设备有效量程
     */
    @Override
    public List<EquipmentRange> selectEquipmentRangeList(EquipmentRange equipmentRange)
    {
        return equipmentRangeMapper.selectEquipmentRangeList(equipmentRange);
    }

    /**
     * 新增设备有效量程
     *
     * @param equipmentRange 设备有效量程
     * @return 结果
     */
    @Override
    public int insertEquipmentRange(EquipmentRange equipmentRange)
    {
        return equipmentRangeMapper.insertEquipmentRange(equipmentRange);
    }

    /**
     * 修改设备有效量程
     *
     * @param equipmentRange 设备有效量程
     * @return 结果
     */
    @Override
    public int updateEquipmentRange(EquipmentRange equipmentRange)
    {
        return equipmentRangeMapper.updateEquipmentRange(equipmentRange);
    }

    /**
     * 批量删除设备有效量程
     *
     * @param rangeIds 需要删除的设备有效量程主键
     * @return 结果
     */
    @Override
    public int deleteEquipmentRangeByRangeIds(Long[] rangeIds)
    {
        return equipmentRangeMapper.deleteEquipmentRangeByRangeIds(rangeIds);
    }

    /**
     * 删除设备有效量程信息
     *
     * @param rangeId 设备有效量程主键
     * @return 结果
     */
    @Override
    public int deleteEquipmentRangeByRangeId(Long rangeId)
    {
        return equipmentRangeMapper.deleteEquipmentRangeByRangeId(rangeId);
    }
}
